home *** CD-ROM | disk | FTP | other *** search
- ; 私製ライブラリ・メモリ篇
- ; (c) MATSUUCHI Ryosuke in Jan,1993
- ;
- ; peek.asm
- ; 任意のセレクタのメモリアクセス
- ;
- ; 1993. 1. 8(Fri)
-
- public peekd, poked
-
-
- include grplib.inc
-
- assume cs:cseg, ds:dseg
-
-
- dseg segment dword 'DATA'
-
- dseg ends
-
-
- cseg segment dword 'CODE'
-
- ;---------------------------------------------------------------
- ; unsigned int peekd(sel, ofs)
- ;---------------------------------------------------------------
-
- peekd proc
- mov ecx,[esp+4]
- mov edx,[esp+8]
- mov fs,cx
- mov eax,fs:[edx]
- ret
- peekd endp
-
- ;---------------------------------------------------------------
- ; void poked(sel, ofs, dat)
- ;---------------------------------------------------------------
-
- poked proc
- mov ecx,[esp+4]
- mov edx,[esp+8]
- mov eax,[esp+12]
- mov fs,cx
- mov fs:[edx],eax
- ret
- poked endp
-
-
- cseg ends
-
-
- end
-